package com.bw.liuyushan.zhuangao4_mvptest1.MVP.View.Activity;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.widget.ImageView;

import com.bw.liuyushan.mvp_lib.View.BaseActivity;
import com.bw.liuyushan.zhuangao4_mvptest1.MVP.Contrack.ICTest;
import com.bw.liuyushan.zhuangao4_mvptest1.MVP.Presenter.BasePresenterTest;
import com.bw.liuyushan.zhuangao4_mvptest1.R;
import com.yzq.zxinglibrary.encode.CodeCreator;

/**
 * ZhuanGao4_MVPTest1
 * file name is : ZxingActivity
 * created by Ender on 2021/8/20 16:54.
 * author : 刘雨杉
 * Describe(作用):生成二维码的Activity
 */
public class ZxingActivity extends BaseActivity<BasePresenterTest> implements ICTest.C_ViewTest {
    private android.widget.ImageView zxingImg;

    @Override
    public int bindLayout() {
        return R.layout.activity_zxing;
    }

    @Override
    public void initView() {

        zxingImg = (ImageView) findViewById(R.id.zxingImg);
    }

    @Override
    public void initDate() {
        Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.fish);
        zxingImg.setImageBitmap(CodeCreator.createQRCode("从Java入门到入土为安",300,300,bitmap));

    }
}
